package com.todod.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.todod.model.Department;
import com.todod.model.User;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author jpf
 * @since 2020-12-14
 */
public interface IDepartmentService extends IService<Department> {

	List<Department> getdepart(Long _userId);

	List<Department> geList();

	void adddpart(Department department, Long _userId);

	Department getDepartmentById(Long id);

	void editdepart(Department department, Long _userId);

	List<Department> getdepartList();

	List<Long> getdepatrtid(User byId);

	List<Long> getdepatrtid2(Long id);

	List<Department> getdepart3(Long id);

	/**
	 * 获取本级和下级部门
	 * 
	 * @Title: getDownLevenList
	 * @Description:
	 * @author gsh
	 * @date 2021年1月9日
	 * @param departid
	 * @return
	 */
	List<Department> getDownLevenList(Long departid);

	/**
	 * 构建成tree
	 * 
	 * @Title: buildTree
	 * @Description:
	 * @author gsh
	 * @date 2021年1月9日
	 * @param entities
	 * @param id
	 * @return
	 */
	List<Department> buildTree(List<Department> entities, Long id);

	/**
	 * 获取全部启用部门
	 * 
	 * @Title: getAllEnableList
	 * @Description:
	 * @author gsh
	 * @date 2021年1月20日
	 * @return
	 */
	List<Department> getAllList();

	List<String> getDownIdList(Department d, Long userId);

}
